package com.woniu.form;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
@ApiModel(description = "添加店铺菜品表单")
public class InsertStoreProductForm {
    @NotBlank(message = "菜品名称不能为空")
    @Size(min = 1, max = 20, message = "菜品名称长度在1-20之间")
    @ApiModelProperty(value = "菜品名称")
    private String productName;
    @Size(min = 1, max = 50, message = "菜品介绍长度在1-50之间")
    @ApiModelProperty(value = "菜品介绍")
    private String productIntr;
    @NotNull(message = "菜品类型id不能为空")
    @Positive(message = "菜品类型id必须为正整数")
    @ApiModelProperty(value = "菜品类型id")
    private Long food_type_id;
    @NotNull(message = "菜品价格不能为空")
    @Positive(message = "菜品价格必须为正数")
    @DecimalMax(value = "10000", message = "菜品价格不能超过10000")
    @ApiModelProperty(value = "菜品价格")
    private BigDecimal productPrice;
    @ApiModelProperty(value = "菜品图片路径")
    private String filePath;
}
